// 待提货页面的接口
import { $get, $post } from "./index";

/* 查询待提货订单 start */

export interface WaitForReceiveNewParams {
  btcId: string; // ID
  work: boolean; // 工作人员公众号全部订单
  keywords: string; // 关键字
  wxStatus?: number | string; // 微信的状态
  pickUpMode?: number; // 提货方式
  examineFlag?: boolean; // 只显示工作人员网点的承运单和预订单
  record?: boolean;
  isReceiving?: number | string; // 待确认用
  flag?: number | string; // 待支付用
  startBillingTime?: string; // 开始时间
  endBillingTime?: string; // 结束时间
  pickUpNum?: number ; // 部分提货2 已完成1
}

export const getWaitForReceiveList = (query,data: WaitForReceiveNewParams) => {
  return $post(`/selfmachine-system/workerIndex/waitForReceiveNew?pageNum=${query.pageNum}&pageSize=${query.pageSize}`,data);
};

/* 查询待提货订单 end */

/* 查询提货记录 start */
export const getPickRecord = (query,data: WaitForReceiveNewParams) => {
  return $post(`/selfmachine-system/workerIndex/waitForReceive?pageNum=${query.pageNum}&pageSize=${query.pageSize}`,data);
};
/* 查询提货记录 end */

/* 判断有无保管费 start*/
export const checkPickup = (data) => {
  return $post(`/selfmachine-system/fee/checkPickup`,data);
};

/* 判断有无保管费 end*/


/* 获取仓储时长 start */
export const getstorageDuration = (data) => {
  return $post(`/selfmachine-system/workerIndex/storageDuration`,data);
};
/* 获取仓储时长 end */


/* 我要交货页接口 start 还没改就改了接口url*/
export const pickGoods = (data) => {
  console.log(data,'接口数据')
  return $post(`/selfmachine-system/takeCargo/takeGoodsByBillNo`, data);
};

/* 我要交货页接口 end */


/* 我要交货页成功详情接口 start 还没改*/
export interface GetupdateRemarksListParams {
  billNo: string, // 承运单号
}

export const getupdateRemarksList = (data: GetupdateRemarksListParams) => {
  return $post(`/selfmachine-system/order/list`, data);
};

/* 我要交货页成功详情接口 end */



